package com.agui.apollo_demo.index;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class IndexController {



    @Value("${name:yang}")
    private String name;

    @RequestMapping("/index")
    public String index() {
//        Config appConfig = ConfigService.getAppConfig();
//        String someKey = "age";
//        //获取配置信息,参数1——配置的key，参数2——默认值
//        String value = appConfig.getProperty(someKey, null);
        //打印配置信息，验证
        log.info("testString:" + name);
        return "hello world " + name;
    }
}
